import request from '@/utils/request.js'

/**
 *
 * @returns 获取组织架构
 */
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})

/**
 * 根据id获取角色信息
 */
export const reqGetUser = (id) => request({
  method: 'get',
  url: `/sys/role/${id}`
})

/**
 * 根据id删除角色
 */
export const reqDelDepartment = (id) => request({
  method: 'delete',
  url: '/company/department/' + id
})

/**
 * 获取员工的简单列表
 * **/
export function reqGetEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}

/**
 * 新增部门接口
 **/
export function reqAddDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
